import { createRouter, createWebHashHistory } from 'vue-router'
import HomeView from '@/views/layout/LayoutView.vue'

// 导入layout目录下的组件
import BoxLayout1 from '@/views/layout/BoxLayout1.vue'
import BoxLayout2 from '@/views/layout/BoxLayout2.vue'
import BoxLayout3 from '@/views/layout/BoxLayout3.vue'
import BoxLayout4 from '@/views/layout/BoxLayout4.vue'

import Box1 from '../views/Box1.vue'
import Box2 from '../views/Box2.vue'
import Box3 from '../views/Box3.vue'

import Box5 from '../views/Box5.vue'
import Box6 from '../views/Box6.vue'
import Box7 from '../views/Box7.vue'
import Box8 from '../views/Box8.vue'
import Box9 from '../views/Box9.vue'
import Box10 from '../views/Box10.vue'
import Box11 from '../views/Box11.vue'
// import Box12 from '../views/Box12.vue'
import Box13 from '../views/BoxThirteen.vue'
import Box14 from '../views/Box14.vue'
import StorageTest from '../views/StorageTest.vue'
// import Box15 from '../views/box15.vue'
const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    // r
    // 路由从定向
    redirect: '/box1',

    children: [
      {
        path: '/box1',
        name: 'box1',
        component: Box1
      },
      {
        path: '/BoxLayout1',
        name: 'BoxLayout1',
        component: BoxLayout1
      },
      {
        path: '/BoxLayout2',
        name: 'BoxLayout2',
        component: BoxLayout2
      },
      {
        path: '/BoxLayout3',
        name: 'BoxLayout3',
        component: BoxLayout3
      },
      {
        path: '/BoxLayout4',
        name: 'BoxLayout4',
        component: BoxLayout4
      },
    ]
  },

  // {
  //   path: '/box1',
  //   name: 'box1',
  //   component: Box1
  // },
  { path: '/box2', name: 'box2', component: Box2 },
  { path: '/box3', name: 'box3', component: Box3 },

  { path: '/box5', name: 'box5', component: Box5 },
  { path: '/box6', name: 'box6', component: Box6 },
  { path: '/box7', name: 'box7', component: Box7 },
  { path: '/box8', name: 'box8', component: Box8 },
  { path: '/box9', name: 'box9', component: Box9 },
  { path: '/box10', name: 'box10', component: Box10 },
  { path: '/box11', name: 'box11', component: Box11 },
  // { path: '/box12', name: 'box12', component: Box12 },
  { path: '/box13', name: 'BoxThirteen', component: Box13 },
  {
    path: '/box14', name: 'BoxFour', component: Box14
  },
  {
    path: '/storage-test', name: 'StorageTest', component: StorageTest
  },
  // { path: '/box15', name: 'box15', component: Box15 },
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router